
#pragma once

class CWinMFCSystem: public SkinSystem
{
public:
  CWinMFCSystem();
  virtual ~CWinMFCSystem();

  void * getWindowsPoint();
  void     SetWindows(CMFCPropertyGridCtrl *prop, CTreeCtrl *tree)
  {
   m_Properties = prop;
   m_TreeCtrl = tree;
  };

  virtual bool CopyFilesEx(String source, String destination);
  virtual bool MakeDirectory(String dirname);
  virtual String GetExePath();
  virtual void DeleteFile(const String &file);
  virtual void RenameFile(const String &oldname, const String &newname);
  virtual void GetFileList(String path, StringVector &list);
  virtual String DisplayOpenDialog(String title, StringVector ExtensionList);
  virtual String DisplaySaveDialog(String title, StringVector ExtensionList);
  virtual DIALOGRET DisplayMessageDialog(String msg, DIALOGTYPE dlgType);
  virtual bool         DisplayETLDialog(NameValuePairList &params);

  virtual void         UnLoadPropertySheets();
  virtual void         LoadPropertySheet(int idx, String filename);
  virtual void	       ClearProperty(void *caller, int idx);
  virtual void	       EnableProperty(void *caller, int idx, bool enable);
  virtual void         ExpandProperty(void *caller, int idx, bool expand);

  virtual String GetStringProperty(void *caller, int idx);
  virtual int          GetIntProperty(void *caller, int idx);
  virtual float        GetFloatProperty(void *caller, int idx);
  virtual bool         GetBoolProperty(void *caller, int idx);
  virtual unsigned int GetColourProperty(void *caller, int idx);
  virtual bool         SetProperty(void *caller, int idx,String value);
  virtual bool         SetProperty(void *caller, int idx,int value);
  virtual bool         SetProperty(void *caller, int idx,float value);
  virtual bool         SetProperty(void *caller, int idx,bool value);
  virtual bool         SetProperty(void *caller,int idx,Vector2 value);
  virtual bool         SetProperty(void *caller,int idx,Vector3 value);
  virtual bool         SetProperty(void *caller,int idx,Vector4 value);
  virtual bool         SetProperty(void *caller,int idx,Quaternion value);
  virtual bool         SetColourProperty(void *caller, int idx,DWORD value);
  virtual bool         HasTreeView();
  virtual bool         HasPropertiesView();
  virtual bool         ClearPropertiesView(unsigned int ID);
  virtual HTREEITEM    FindTreeItem(CString &str, HTREEITEM hItem);
  virtual void         SelectTreeItem(String name);
  virtual void         EditCurrentTreeItem();
  virtual void *       InsertTreeItem(String parent,String name,int iconid, unsigned int colour);
  virtual void *       InsertTreeItem(void *parent,String name,int iconid, unsigned int colour);
  virtual void         SetTreeItemText(String oldname, String newname);
  virtual void         DeleteTreeItem(String name);
  virtual void *       CreateTreeRoot(String name);
  virtual void         ClearTreeItems();

  virtual void         FillPropertyOptions(void *caller, int idx, StringVector &optlist);
  virtual void         CreateGroupProperty(void *caller, int idxparent, int idxnew, String namenew, bool valuelist = true);
  virtual void         CreateStringProperty(void *caller, int idxparent, int idxnew, String namenew);
  virtual void         CreateIntProperty(void *caller, int idxparent, int idxnew, String namenew);
  virtual void         CreateFloatProperty(void *caller, int idxparent, int idxnew, String namenew, String format = "%.2f");
  virtual void         CreateBoolProperty(void *caller, int idxparent, int idxnew, String namenew);
  virtual void         CreateFileProperty(void *caller,int idxparent, int idxnew, String namenew,String &FileSelecttype,String &Filetype,const String& szDescr ) ;
  virtual void         CreateColourProperty(void *caller,int idxparent, int idxnew, String namenew) ;


  virtual void         SetTreeItemColour(String name, unsigned int colour );

  virtual void SetMouseCursor(unsigned int cursor);
  virtual void SetMousePosition(Vector2 position);
  virtual void ShowMouseCursor(bool bShow);

   virtual void         SetGUIControlIndex(OGUIWidget *widget, int IDX);
   virtual void         SetGUIControlText(OGUIWidget *widget, String text);
   virtual int          GetGUIControlIndex(OGUIWidget *widget);
   virtual String  GetGUIControlText(OGUIWidget *widget);
   virtual void         SetGUIControlItems(OGUIWidget *widget, StringVector items);

private:
  CMFCPropertyGridCtrl     *m_Properties;
  CTreeCtrl                *m_TreeCtrl;
  CMFCPropertyGridProperty *m_PropertySheets[OGITOR_MAX_OBJECT_TYPE];
  CMFCPropertyGridProperty *m_UserDefined;
};
